package com.techsoul.module.accounting.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.techsoul.module.accounting.pojo.entity.AccApSkuMonthlySettlement;
import com.techsoul.module.accounting.pojo.param.AccApSkuMonthlySettlementSearchParam;
import com.techsoul.module.accounting.pojo.param.AccountingApSearchParam;
import com.techsoul.module.accounting.pojo.vo.AccApSkuMonthlySettlementViewVo;
import com.techsoul.module.accounting.pojo.vo.AccApSkuMonthlySettlementVo;
import com.techsoul.module.accounting.pojo.vo.AccountingApVo;
import com.techsoul.module.order.pojo.param.SalesOrderItemSearchParam;
import com.techsoul.module.pms.pojo.vo.CustGoodsMapVo;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

/**
 * 财务月度sku汇总Mapper接口
 * 
 * @author liuen
 * @date 2021-06-01
 */
public interface AccApSkuMonthlySettlementMapper extends BaseMapper<AccApSkuMonthlySettlement> {

    /**
     * 详情
     * @param id
     * @return
     */
    AccApSkuMonthlySettlementVo findById(String id);

    /**
     * 列表
     * @param params
     * @return
     */
    List<AccApSkuMonthlySettlementVo> findAll(@Param("params") AccApSkuMonthlySettlementSearchParam params);

    /**
     * 分页
     * @param page
     * @param params
     * @return
     */
    IPage<AccApSkuMonthlySettlementVo> findAll(Page page, @Param("params") AccApSkuMonthlySettlementSearchParam params);
    List<AccApSkuMonthlySettlementVo>  findByJobMothYr(@Param("jobMonth") String jobMonth);
    /**
     * 品牌排行分页
     * @param page
     * @param params
     * @return
     */
    IPage<AccApSkuMonthlySettlementViewVo> brandRateView(Page page, @Param("params") AccApSkuMonthlySettlementSearchParam params);

    /**
     * 品牌排行分页
     * @param page
     * @param params
     * @return
     */
    IPage<AccApSkuMonthlySettlementViewVo> spuRateView(Page page, @Param("params") AccApSkuMonthlySettlementSearchParam params);

    /**
     * 供应商分页
     * @param page
     * @param params
     * @return
     */
    IPage<AccApSkuMonthlySettlementViewVo> supplierRateView(Page page, @Param("params") AccApSkuMonthlySettlementSearchParam params);
    /**
     * 店铺分页
     *
     * @param params
     * @return
     */
    IPage<AccApSkuMonthlySettlementViewVo> storeRateView(Page page,@Param("params") AccApSkuMonthlySettlementSearchParam params);

    IPage<AccApSkuMonthlySettlementViewVo> skuSpuRateReport(Page page, @Param("params") AccApSkuMonthlySettlementSearchParam params);

    IPage<AccApSkuMonthlySettlementViewVo> spuRateReport(Page page, @Param("params") AccApSkuMonthlySettlementSearchParam params);

    IPage<AccApSkuMonthlySettlementViewVo> skuRateView(Page page, @Param("params") AccApSkuMonthlySettlementSearchParam params);
    /**
     * 采购额 按区域查询
     * @param params
     * @return
     */
    AccApSkuMonthlySettlementViewVo countTotalPurchase(@Param("params") AccApSkuMonthlySettlementSearchParam params);
    List<AccApSkuMonthlySettlementViewVo> countMonthlyLineChart(@Param("params") AccApSkuMonthlySettlementSearchParam params) ;
    /**
     * 销售额 按区域查询
     * @param params
     * @return
     */
    AccApSkuMonthlySettlementViewVo countTotalSale(@Param("params") AccApSkuMonthlySettlementSearchParam params);
    List<AccApSkuMonthlySettlementViewVo> reportSum(@Param("params") AccApSkuMonthlySettlementSearchParam params);
}
